package com.ideal.gpt;

import com.lzwork.utility.config.CommonConfig;

/**
 * @author LiZheng
 * @date 2023年9月20日 下午4:07:20
 */

public class GptJobConfig extends CommonConfig
{
	static GptJobConfig instance;

	static
	{
		reset();
	}

	public static boolean reset()
	{
		instance = new GptJobConfig();
		return instance.start("config.properties");
	}

	private GptJobConfig()
	{
		// hide constructor
	}

	public static String root()
	{
		return instance.pathRoot;
	}

	public static GptJobConfig instance()
	{
		return instance;
	}

	public static String getProp(String key)
	{
		return instance.getPropValue(key);
	}

	public static int getIntProp(String name, int defaultValue)
	{
		return instance.getPropInt(name, defaultValue);
	}

	public static String url()
	{
		return getProp("url");
	}

	public static String tag5root()
	{
		return instance.getPropValue("tag5root", instance.pathRoot);
	}

	@Override
	protected boolean canBeOverwrite()
	{
		return true;
	}
}
